#外观模式
class Stock1 :
    def buy(self):
        print("买入股票1")
    def sell(self):
        print("卖出股票1")
        
class Stock2 :
    def buy(self):
        print("买入股票2")
    def sell(self):
        print("卖出股票2")
        
class Stock3 :
    def buy(self):
        print("买入股票3")
    def sell(self):
        print("卖出股票3")
#知道哪些子系统类负责处理请求，将客户的请求代理适当的子系统对象
class Fund :
    def __init__(self):
        self.sk1 = Stock1()
        self.sk2 = Stock2()
        self.sk3 = Stock3()
    def buyFund(self):
        self.sk1.buy()
        self.sk2.buy()
        self.sk3.buy()
    def sellFund(self):
        self.sk1.sell()
        self.sk2.sell()
        self.sk3.sell()
# 业务代码
if __name__ == "__main__":
    fund= Fund()
    fund.buyFund()
    fund.sellFund()